 // 过场动画
 var loadindex = layer.load(1, {
    shade: [1, '#fff']
})
var pageSize = 8
$.get('./php/lianbiao.php', res => {
    console.log(res);
    
    var { meta: { status, msg }, data } = res;
    if (status === 1) {
        new Page('fenye', {
            pageData: {
                total: data.length,
                pageSize
            }, show: function (currentPage) {
                var arr = data.slice((currentPage - 1) * pageSize, currentPage * pageSize)
                var str = '';
                for (var i = 0; i < arr.length; i++) {
                    str += `
                        <li class="col-lg-3 col-md-4 col-sm-6">
                            <a href="xiangqing.html?id=${arr[i].id}">
                                <img src="${arr[i].img}" alt="">
                            </a>
                            <div class="xia">
                                <div>
                                    <a href="xiangqing.html?id=${arr[i].id}" class="biaoyu">${arr[i].name}</a>
                                </div>
                                <div class="jianshao_box">
                                    <a href="xiangqing.html?id=${arr[i].id}" class="jianshao">${arr[i].biaoyu}</a>
                                </div>
                                <h3>￥${arr[i].yuanjia}</h3>
                            </div>
                        </li>
                `
                }
                $('.zhuti .row').html(str)
            }
        })
    }
    layer.close(loadindex)
}, 'json')
